var fun = function(doc, win) {
	var docEl = doc.documentElement,
	resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
	recalc = function() {
		var cwid = docEl.clientWidth || doc.body.clientWidth;
		if (!cwid) return;
		docEl.style.fontSize = 100 * (cwid / 750) + 'px';
	};
	if (!doc.addEventListener) return;
	win.addEventListener(resizeEvt, recalc, false);
	doc.addEventListener('DOMContentLoaded', recalc, false);
}
fun(document, window);